<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>考核方案修改</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/public.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/main.css"
	rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- rich:message style-->
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>
</head>
<body style="background-color: #ffffff">
<script type="text/javascript">		
//<![CDATA[  
	function setType(){
		var type0=document.getElementById("addid:type0");
		var type0_value=type0.options[type0.selectedIndex].value;
		var type0_text=type0.options[type0.selectedIndex].text;
		//alert(type0_text)
		//alert(document.getElementById("addid:type0"))
		var type1=document.getElementById("addid:userkind_sd");
		var type1_options=type1.options;
		type1.options[0].selected=true;
		type1.options[0].value=type0_value;
		type1.options[0].text=type0_text;

 
		//set hidden value
		//alert(type0_value)
		document.getElementById("addid:queryKindType").value=type0_value;
		//alert(document.getElementById("addid:queryKindType").value)
	}
	//]]>
</script>
<a4j:form id="addid">
	<h:inputHidden id="queryKindType" name="queryKindType" value=""/>
	<div id="right">
	<div class="error pt10p bcf c0 tal" style="display: "><a4j:outputPanel
		id="msgPanel">
		<center><h:outputText styleClass="cff"
			value="#{QualifyforBB.msg}" /></center>
	</a4j:outputPanel></div>
	<div class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<h:inputHidden value="#{QualifyforBB.examinebank.tp_e_id}" />
			<td><span class="cff">*</span>考核名称<h:inputText id="tp_e_aim"
				class="style_input" value="#{QualifyforBB.examinebank.tp_e_aim}" 
				disabled="true"></h:inputText></td>
			<td><span class="cff">*</span>技能组
				<h:selectOneMenu id="type0" onchange="setType();"
				class="style_input" value="#{QualifyforBB.examinebank.tp_userkind}">
				<f:selectItem />
				<f:selectItems value="#{paramBB.selectItems_param}" />
			</h:selectOneMenu></td>
		</tr>
		<tr>
			<td><rich:message for="tp_e_aim" showSummary="true" showDetail="false" /></td>
			<td></td>
		</tr>
		<tr>
			<td class="yellow"><span class="cff">*</span>开始日期 <rich:calendar
				id="begindate" datePattern="yyyy-MM-dd"
				value="#{QualifyforBB.examinebank.tp_usedbegin}" required="true" /></td>
			<td class="yellow"><span class="cff">*</span>终止日期 <rich:calendar 
				id="enddate" value="#{QualifyforBB.examinebank.tp_usedend}"
				datePattern="yyyy-MM-dd" required="true" /></td>
		</tr>
		<tr>
			<td><rich:message for="begindate" showSummary="true" showDetail="false" /></td>
			<td><rich:message for="enddate" showSummary="true" showDetail="false" /></td>
		</tr>
		<tr>
			<td><span class="cff">*</span>时间要求(分钟)<h:inputText id="tp_t_time"
				class="style_input" value="#{QualifyforBB.examinebank.tp_t_time}" validator="#{validatorBB.numValidate}"
				required="true"/></td>
			<td></td>
		</tr>
		<tr>
			<td><rich:message for="tp_t_time" showSummary="true" showDetail="false" /></td>
			<td></td>
		</tr>
		<tr>
			<td class="yellow" colspan="2">备注信息 <label>
			<h:inputTextarea class="style_textarea" id="tp_e_mark"
				value="#{QualifyforBB.examinebank.tp_e_mark}" >
				<f:validateLength  maximum="200" /></h:inputTextarea> </label><span class="notice"><rich:message for="tp_e_mark" showSummary="true" showDetail="false" /></span></td>
		</tr>
	</table>
	</div>
	<div class="listbut"><a4j:commandButton styleClass="buttonbg"
		value="保存" action="#{QualifyforBB.updateExaminebank}"
		reRender="msgPanel,msgPanel_" /></div>
		<div class="error pt10p bcf c0 tal" style="display: "><a4j:outputPanel
		id="msgPanel_">
		<center><h:outputText styleClass="cff"
			value="#{QualifyforBB.msg}" /></center>
	</a4j:outputPanel></div>
	<div id="sdArea" style="display: ''" class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td>office<h:selectOneMenu
				class="style_input" value="#{QualifyforBB.office_code}">
				<f:selectItem />
				<f:selectItems value="#{otherParamBB.selectItems_officeInfId}" />
			</h:selectOneMenu></td>
			<td>技能组<h:selectOneMenu
				id="userkind_sd" class="style_input" value="#{QualifyforBB.tp_userkind}"
				disabled="true">
				<f:selectItem />
				<f:selectItems value="#{paramBB.selectItems_param}" />
			</h:selectOneMenu></td>
			<td>操作日期 <rich:calendar datePattern="yyyy-MM-dd" value="#{QualifyforBB.question_op_date}" /></td>
		</tr>
		<tr>
			<h:inputHidden id="tp_e_id_sd" value="#{QualifyforBB.mappine.tp_e_id}" />
			<td>题 目<h:inputText
				class="style_input" value="#{QualifyforBB.tp_question_keyWord}" /></td>
			<td>题目类型 <h:selectOneMenu
				class="style_input" value="#{QualifyforBB.tp_question_type}">
				<f:selectItem />
				<f:selectItems value="#{paramBB.selectItem['tp_question_type']}" />
			</h:selectOneMenu></td>
			<td>
			考题类别<h:selectOneMenu
							class="style_input" value="#{QualifyforBB.tp_classid}">
							<f:selectItem itemValue="0" itemLabel="" />
							<f:selectItems value="#{otherParamBB.selectItems_questionClasss}" />
						</h:selectOneMenu>
			</td>
			<td><a4j:commandButton value="查询" styleClass="buttonbg"
				action="#{QualifyforBB.queryQuestions}" reRender="subjecttable,msgPanel,msgPanel_" /></td>
		</tr>
	</table>
	<rich:dataTable rowClasses=",yellow" width="100%" id="subjecttable"
		value="#{QualifyforBB.questionsbanks}" var="table">
		<a4j:keepAlive beanName="QualifyforBB" />
		<f:facet name="header">
			<rich:columnGroup>
				<rich:column>
					<h:outputText value="选择" />
				</rich:column>
				<rich:column>
					<h:outputText value="office" />
				</rich:column>
				<rich:column>
					<h:outputText value="题目" />
				</rich:column>
				<rich:column>
					<h:outputText value="答案代码" />
				</rich:column>
				<rich:column>
					<h:outputText value="答案描述" />
				</rich:column>
				<rich:column>
					<h:outputText value="题目类型" />
				</rich:column>
				<rich:column>
					<h:outputText value="题目类别" />
				</rich:column>
				<rich:column>
					<h:outputText value="分值" />
				</rich:column>
				<rich:column>
					<h:outputText value="技能组" />
				</rich:column>
				<rich:column>
					<h:outputText value="添加状态" />
				</rich:column>
				<rich:column>
					<h:outputText value="操作人" />
				</rich:column>
				<rich:column>
					<h:outputText value="操作日期" />
				</rich:column>
			</rich:columnGroup>
		</f:facet>
		<rich:columnGroup>
			<rich:column>
				<h:selectBooleanCheckbox value="#{table.select}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.office_code_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_question}" >
					<f:converter converterId="HeadingConverter"/>
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_answer_code}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_answer}"  >
					<f:converter converterId="HeadingConverter"/>
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_question_type_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_classid_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_point}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_userkind_value}" />
			</rich:column>
			<rich:column>
				<h:outputText style="color:#ff0000;" value="#{table.related}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.op}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.op_date}" >
					<f:convertDateTime pattern="yyyy-MM-dd" timeZone="GMT+8" />
				</h:outputText>
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable>
	<div class="listbut"><a4j:commandButton styleClass="buttonbg2"
		value="添加试题" action="#{QualifyforBB.addMappine}"
		reRender="subjecttable,msgPanel,msgPanel_" /> <a4j:commandButton
		styleClass="buttonbg2" value="删除试题"
		action="#{QualifyforBB.deleteMappine}"
		reRender="subjecttable,msgPanel,msgPanel_" /> <a4j:commandButton
		styleClass="buttonbg2" value="查看考核试题"
		action="#{QualifyforBB.queryMappines}"
		reRender="subjecttable,msgPanel,msgPanel_" /> <h:commandButton
		styleClass="buttonbg" value="返回" action="back" immediate="true"/></div>
	</div>
	</div>
</a4j:form>
</body>
</html>
